<%@LANGUAGE="VBSCRIPT" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Get Email Server</title>
</head>

<body>
<%
' Get Email Server Function
dim Efs
Efilepath=server.MapPath("access/backend/emailserver.txt")

set Efs=server.CreateObject("scripting.filesystemobject")

if not Efs.fileexists(Efilepath) then 
	Efs.createtextfile(Efilepath)
	%><script type="text/vbscript">msgbox"Your email was not sent because no Email Server has been set. Please advise your administrator of this",,"No Email Server Set"</script><%
	application("EmailServer")=""
end if

set Ef=Efs.OpenTextFile(Efilepath,1,true)

if Ef.AtEndOfStream then
	%><script type="text/vbscript">msgbox"AtEndOfStream"</script><%
else
	application("EmailServer")=Ef.readline()
end if
Ef.close
set Ef=nothing
set Efs=nothing
%>
</body>
</html>
